package per.mapt.webservice;

import per.mapt.webservice.vo.IntegerUserMapAdapter;
import per.mapt.webservice.vo.User;

import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Map;

/**
 * Created by mapei on 2017/3/18.
 */
@WebService
public interface HelloService {
    String sayHi(@WebParam(name = "text") String text);

    /* Advanced usecase of passing an Interface in.  JAX-WS/JAXB does not
     * support interfaces directly.  Special XmlAdapter classes need to
     * be written to handle them
     */
    String sayHiToUser(User user);

    @XmlJavaTypeAdapter(IntegerUserMapAdapter.class)
    Map<Integer, User> getUsers();
}
